<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <title>智能搜索优惠券</title>
    <link rel="stylesheet" type="text/css" href="../css/aui.css"/>
    <link rel="stylesheet" type="text/css" href="../css/common.css"/>
    <style>
        body{background-color: rgba(0,0,0,.5);}
        .box{
            width: 70%;
            height: 50%;
            border-radius: .4rem;
            position: absolute;
            top: 20%;
            left: 15%;
            opacity: 1;
            box-shadow: 0 0 40px rgba(0,0,0,.08);
            text-align: center;
            color: #212121;
            font-size: .7rem;
            background: #fff;
        }
        .close{position: absolute;top: 75%;left: 50%;margin-left: -1rem;}
        .close img{width: 2rem;}
        .text{padding: 1rem;min-height: 3rem;}
        .btn{padding: 0 10%;margin-top: .5rem;}
        .btn .aui-btn{border-radius: 5rem;}
        .con{min-height: 3rem;}
        .other p{margin: .5rem 0;color: #999;}
        .other p img{width: 2.5rem;border-radius: 50%;display: inline-block;}
    </style>
</head>
<body>
    <div class="aui-content box">
        <div><img src="../image/search_bg.png"></div>
        <div class="text aui-ellipsis-2" id="text"></div>
        <div class="btn" onclick="dosearch(this)" data-tjp="t"><div class="aui-btn aui-btn-danger aui-btn-block aui-btn-sm jb">搜索淘宝天猫</div></div>
        <div class="other">
            <p>—— 其它搜索 ——</p>
            <p>
                <img src="../image/jd.png" style="margin-right: 1rem;" onclick="dosearch(this)" data-tjp="j">
                <img src="../image/pinduoduo.png" onclick="dosearch(this)" data-tjp="p">
            </p>
        </div>
    </div>
    <div class="close" onclick="closed()" tapmode><img src="../image/mask_close.png"></div>
</body>
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript" src="../script/zepto.min.js"></script>
<script type="text/javascript">
    apiready = function(){
        api.parseTapmode();
        var text = api.pageParam.text||'';
        $('#text').text(text);
    };
    function closed(){
        api.closeFrame({
            name: 'listen_copy_frm'
        });
    }
    //搜索方法
    function dosearch(obj){
        api.openWin({
            name: 'search_re_win',
            url: './search_re_win.html',
            reload:true,
            pageParam: {
                q: $api.trim($('#text').text()),
                tjp:$(obj).data('tjp'),
                from:'copy'
            },
            //bounces: true,
            bgColor: '#fff',
            vScrollBarEnabled: false,
            hScrollBarEnabled: false,
            progress:{
                type:'page',
                color:'rgba(255,0,102,1.0)'
            }
        });
    }
</script>
</html>